package demo;

import java.util.*;

public class RandomString
{
	private static String base = 
		"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
	private String s;

	RandomString(int k)
	{
		Random rand = new Random();
		StringBuffer sb = new StringBuffer();
		for (int i = 0; i<k ; i++ )
		{
			int number = rand.nextInt(base.length());
			sb.append(base.charAt(number));
		}

		this.s = sb.toString();
	}

	public String toString() {return this.s;}
}